<template>
  <div id="container" :data="data">
    <chartTitle :title="title"></chartTitle>
    <div class="main">
      <img src="../../image/index/icon4.png" alt="" />
      <div>
        <span class="p1">总人数</span>
        <span class="p2">{{data? data: 0}}</span>
      </div>
    </div>
  </div>
</template>

<script>
import chartTitle from '../chart-title/index.vue'
export default {
  components: {
    chartTitle
  },
  name: 'itemBox',
  props: {
    title: String,
    data: [Number, String]
  },
  data() {
    return {}
  },

  mounted() {
    this.onInit()
  },

  methods: {
    onInit() {}
  }
}
</script>

<style lang="less" scoped>
#container {
  width: 100%;
  height: 20.4vh;
  color: #fff;
  background-color: rgba(7, 38, 46, 0.2);
  // border: 1px solid rgba(194, 215, 253, .2);
  .main {
    margin-top: 1vh;
    display: flex;
    // justify-content: space-between;
    // justify-content: center;
    align-items: center;
    background-image: url(../../image/index/itemBg3.png);
    background-size: 100% 100%;
    width: 100%;
    height: 13vh;
    padding-left: 5vh;
    img {
      width: 9vh;
      height: 9vh;
    }
    > div {
      text-align: center;
      // padding-top: 1.8vh;
      // line-height: 3vh;
      margin-left: 2vh;
      .p1 {
        margin-left: 2vh;
        color: #fff;
        font-size: 1.6vh;
      }
      .p2 {
        margin-left: 2vh;
        color: #fff;
        font-weight: bold;
        font-size: 2vh;
      }
    }
  }
}
</style>
